package xkp.lesson.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import xkp.lesson.dao.UserInfoDao;
import xkp.lesson.service.UserInfoService;

@Configuration  //跨域时可以使用该注解做跨域配置
public class BeanConfig {
    @Bean(value = "myUserInfoDao")
    public UserInfoDao userInfoDao(){
        return new UserInfoDao();
    }

    @Bean
    public UserInfoService userInfoService(){
        return new UserInfoService();
    }
}
